#pragma once

#include <vector>
#include <QString>
#include <QDir>
#include <QImage>
#include <algorithm>
using namespace std;
#include "opencv2/opencv.hpp"
using namespace cv;

//删除文件夹
extern bool deleteDir(const QString &path);

extern bool comparsion_y(Point2f a, Point2f b);

extern bool comparsion_x(Point2f a, Point2f b);
///判断点是(x,y)否在椭圆内
///  圆心 centor_x centor_y
///  x半长轴 a
///  y半长轴 b
extern bool isInsideEllipse(int centor_x, int centor_y, int x, int y, int a, int b);

extern int gray_value_roi_mask(Mat image_src,Mat image_mask);

extern int gray_value_roi(Mat image_src,int value_threshold,uint count_standard);

extern bool sort_x(Point2f a, Point2f b);

extern int regionLocation(Mat image_src,int region_threshold_low,int region_threshold_up,cv::Point& point ,vector<Point>& vector_point_show);

extern int measureHighlight(Mat image_src,int m_measure_threshold,double measure_height_max_threshold ,double m_measure_height_min_threshold,double measure_width_max_threshold ,double m_measure_width_min_threshold,vector<int>& vector_measure,vector<Point>& vector_point_show);

extern int detection_existance(Mat image,int detection_existance_threshold);

extern QImage matToQImage(const Mat mat_in);

extern cv::Mat QImageToCvMat(const QImage &image);

extern int64_t verify(const char* license_path);
